package com.aust.dynamicProxy.test4;

import java.lang.reflect.Proxy;

public class ProxyUtil {
    public static Object createProxy(Object object, String userName) {
        return Proxy.newProxyInstance(
                object.getClass().getClassLoader(),
                object.getClass().getInterfaces(),
                new CalculatorHandler(object, userName)
        );
    }
}
